
import { CHANNEL_SET_LIST, CHANNEL_SET_CURRENT } from '../action/actionType'
const initialState = {
    list: [],
    current: 0
}

export default function channelReducer(state = initialState, { type, payload }) {
    switch (type) {
        case CHANNEL_SET_LIST:
            return { ...state, list: [...payload] }
        case CHANNEL_SET_CURRENT:
            return { ...state, current: payload }
        default:
            return state
    }
}
